package ru.urfc.portal.model.radio;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlTransient;

import ru.urfc.portal.model.SpectrObject;
import ru.urfc.portal.model.radio.DeviceSector.VisiorAcceptor;
import ru.urfc.portal.model.radio.DeviceSector.Visitor;

@Table(name = "portal_sectorsfrequensies")
@Entity
public class DeviceSectorFrequencies extends SpectrObject implements VisiorAcceptor {

	private DeviceSector sector;
	private Long frequencyIn; 
	private Long frequencyOut;

	public DeviceSectorFrequencies() {
		super();
	}

	public DeviceSectorFrequencies(DeviceSector sector, Long frequencyIn, Long frequencyOut) {
		super();
		this.sector = sector;
		this.frequencyIn = frequencyIn;
		this.frequencyOut = frequencyOut;
	}

	@XmlTransient
	public DeviceSector getSector() {
		return sector;
	}

	@Override
	public String accept(Visitor visitor) {
		return visitor.accept(this);
	}
	
	@XmlElement
	public Long getFrequencyIn() {
		return frequencyIn;
	}
	
	@XmlElement
	public Long getFrequencyOut() {
		return frequencyOut;
	}
	
}
